package org.javaboy.listener_demo.event;

import org.springframework.context.ApplicationEvent;

/**
 * 第一种事件定义方式
 */
public class MyEvent01 extends ApplicationEvent {

    private String name;
    private String address;

    @Override
    public String toString() {
        return "MyEvent01{" +
                "name='" + name + '\'' +
                ", address='" + address + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public MyEvent01(Object source) {
        super(source);
    }
}
